﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="T2.WebSecurity.Business.Workflows.CheckUserExistsActivity"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:twb="clr-namespace:T2.WebSecurity.Business;assembly=T2.WebSecurity.Business.Entities"
 xmlns:twbei="clr-namespace:T2.WebSecurity.Business.Entities.Interfaces;assembly=T2.WebSecurity.Business.Entities"
 xmlns:twbwa="clr-namespace:T2.WebSecurity.Business.Workflow.Activites;assembly=T2.WebSecurity.Business.Workflow.Activities"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="UserName" Type="InArgument(x:String)" />
    <x:Property Name="UserFound" Type="OutArgument(x:Boolean)" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>T2.WebSecurity.Business.Workflows.CheckUserExistsActivity_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>T2.WebSecurity.Business.Entities.Interfaces</x:String>
      <x:String>T2.WebSecurity.Business</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>EntityFramework</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Common</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Data</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Logging</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Logging.Database</AssemblyReference>
      <AssemblyReference>Microsoft.Practices.EnterpriseLibrary.Validation</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Configuration</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Web</AssemblyReference>
      <AssemblyReference>System.Web.ApplicationServices</AssemblyReference>
      <AssemblyReference>System.Web.Providers</AssemblyReference>
      <AssemblyReference>System.Web.Services</AssemblyReference>
      <AssemblyReference>System.Workflow.Activities</AssemblyReference>
      <AssemblyReference>System.Workflow.ComponentModel</AssemblyReference>
      <AssemblyReference>System.Workflow.Runtime</AssemblyReference>
      <AssemblyReference>System.WorkflowServices</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>WebMatrix.WebData</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Common</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Data</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business.Entities</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business.Workflow.Activities</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>T2.WebSecurity.Business</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Flowchart sap2010:WorkflowViewState.IdRef="Flowchart_1">
    <Flowchart.Variables>
      <Variable x:TypeArguments="twb:IBusinessService" Name="BusService">
        <Variable.Default>
          <mca:CSharpValue x:TypeArguments="twb:IBusinessService">new BusinessService()</mca:CSharpValue>
        </Variable.Default>
      </Variable>
      <Variable x:TypeArguments="twbei:IUserProfile_biz[]" Name="AllUsers" />
      <Variable x:TypeArguments="twbei:IUserProfile_biz" Name="UserRecord" />
    </Flowchart.Variables>
    <Flowchart.StartNode>
      <x:Reference>__ReferenceID2</x:Reference>
    </Flowchart.StartNode>
    <FlowStep x:Name="__ReferenceID2" sap2010:WorkflowViewState.IdRef="FlowStep_1">
      <twbwa:Db_T2_WebSecurity_UserProfile_GetAll sap2010:WorkflowViewState.IdRef="Db_T2_WebSecurity_UserProfile_GetAll_1">
        <twbwa:Db_T2_WebSecurity_UserProfile_GetAll.BS>
          <InArgument x:TypeArguments="twb:IBusinessService">
            <mca:CSharpValue x:TypeArguments="twb:IBusinessService">BusService</mca:CSharpValue>
          </InArgument>
        </twbwa:Db_T2_WebSecurity_UserProfile_GetAll.BS>
        <twbwa:Db_T2_WebSecurity_UserProfile_GetAll.RetVal>
          <OutArgument x:TypeArguments="twbei:IUserProfile_biz[]">
            <mca:CSharpReference x:TypeArguments="twbei:IUserProfile_biz[]">AllUsers</mca:CSharpReference>
          </OutArgument>
        </twbwa:Db_T2_WebSecurity_UserProfile_GetAll.RetVal>
      </twbwa:Db_T2_WebSecurity_UserProfile_GetAll>
      <FlowStep.Next>
        <FlowStep x:Name="__ReferenceID0" sap2010:WorkflowViewState.IdRef="FlowStep_2">
          <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
            <Assign.To>
              <OutArgument x:TypeArguments="twbei:IUserProfile_biz">
                <mca:CSharpReference x:TypeArguments="twbei:IUserProfile_biz">UserRecord</mca:CSharpReference>
              </OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="twbei:IUserProfile_biz">
                <mca:CSharpValue x:TypeArguments="twbei:IUserProfile_biz">AllUsers.Where(p =&gt; p.UserName == UserName).FirstOrDefault()</mca:CSharpValue>
              </InArgument>
            </Assign.Value>
          </Assign>
          <FlowStep.Next>
            <FlowStep x:Name="__ReferenceID1" sap2010:WorkflowViewState.IdRef="FlowStep_3">
              <If DisplayName="If User Exists" sap2010:WorkflowViewState.IdRef="If_1">
                <If.Condition>
                  <InArgument x:TypeArguments="x:Boolean">
                    <mca:CSharpValue x:TypeArguments="x:Boolean">UserRecord != null</mca:CSharpValue>
                  </InArgument>
                </If.Condition>
                <If.Then>
                  <Assign sap2010:WorkflowViewState.IdRef="Assign_2">
                    <Assign.To>
                      <OutArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpReference x:TypeArguments="x:Boolean">UserFound</mca:CSharpReference>
                      </OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="x:Boolean">True</InArgument>
                    </Assign.Value>
                  </Assign>
                </If.Then>
                <If.Else>
                  <Assign sap2010:WorkflowViewState.IdRef="Assign_3">
                    <Assign.To>
                      <OutArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpReference x:TypeArguments="x:Boolean">UserFound</mca:CSharpReference>
                      </OutArgument>
                    </Assign.To>
                    <Assign.Value>
                      <InArgument x:TypeArguments="x:Boolean">False</InArgument>
                    </Assign.Value>
                  </Assign>
                </If.Else>
              </If>
            </FlowStep>
          </FlowStep.Next>
        </FlowStep>
      </FlowStep.Next>
    </FlowStep>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <sads:DebugSymbol.Symbol>d2VDOlxQcm9qZWN0c1xUMlxTZWN1cml0eVxUMi5XZWJTZWN1cml0eVxUMi5XZWJTZWN1cml0eS5CdXNpbmVzc1xXb3JrZmxvd3NcQ2hlY2tVc2VyRXhpc3RzQWN0aXZpdHkueGFtbBBFA5YBDwIBAUkLSWoCAQJTB140AgEsYQtsFAIBH28PjQEUAgEIWw1bawIBM1YNVmECAS1pEWmcAQIBJmQRZG8CASByFXJmAgEJdhN/HAIBF4IBE4sBHAIBD30/fUMCAR55GXlpAgEYiQE/iQFEAgEWhQEZhQFpAgEQ</sads:DebugSymbol.Symbol>
  </Flowchart>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Db_T2_WebSecurity_UserProfile_GetAll_1" sap:VirtualizedContainerService.HintSize="200,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="242,62">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Assign_3" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_3">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">299.895,311.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_2">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">278.895,199.5</av:Point>
            <av:Size x:Key="ShapeSize">242,62</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">399.895,261.5 399.895,311.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_1">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">300,127.5</av:Point>
            <av:Size x:Key="ShapeSize">200,22</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">400,149.5 400,179.5 399.895,179.5 399.895,199.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="614,636">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <av:Point x:Key="ShapeLocation">270,2.5</av:Point>
            <av:Size x:Key="ShapeSize">60,75</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">300,77.5 300,107.5 400,107.5 400,127.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="T2.WebSecurity.Business.Workflows.CheckUserExistsActivity_1" sap:VirtualizedContainerService.HintSize="654,716" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>